<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="java.io.*"%>
<%@ page import="requestInterFace.Handle.userHandle"%>
<%@ page import="xml.response.*"%>
<%@ page import="xml.root"%>
<%@ page import="util.print.printLogCat"%>
<%@ page import="org.sql.table.*"%>
<%@ page import="xml.var"%>
<%@ page import="java.util.Vector"%>
<%@ page import="java.util.Enumeration"%>
<%@ page import="requestInterFace.UserInfoInterFace.*"%>
<%@ page import="jqgrid.jqgrid"%>
<%@ include file="../../util/paramPrint.jsp" %>
<%@ page trimDirectiveWhitespaces="true" %> 
<%
String Product_ID = request.getParameter("Product_ID");
String User_ID = request.getParameter("User_ID");
String userType=(String)session.getAttribute("User_Type");
root root=new root();
if(userType==null||!userType.equals("1")){
//root.setStatus("false");
//root.setMsg("权限不够");
//PrintWriter pw = response.getWriter();
//pw.println(root.getXmlString());
//pw.flush();
//return ;
}
        if(Product_ID==null||User_ID==null||User_ID.equals("")||Product_ID.equals("")){
		root.setStatus("false");
		root.setMsg("请填写正确产品ID和用户ID");
		PrintWriter pw = response.getWriter();
		pw.println(root.getXmlString());
		pw.flush();
		return ;
		}
		User_ID=java.net.URLDecoder.decode(User_ID,"UTF-8");
		userproductinfo1_1 user=new userproductinfo1_1();
		if(Product_ID!=null&&(!Product_ID.equals(""))){
		 user.addequwhile("Product_ID"," = ",Product_ID);
		}
		if(User_ID!=null&&(!User_ID.equals(""))){
		 user.addequwhile("User_ID"," = ",User_ID);
		}
		int row=user.delete();
		
		root.setRecords(""+row);//设置当前查询到的记录数
		if(row>0){
        root.setStatus("true");
		root.setMsg("删除产品成功");
		}else{
		root.setStatus("false");
		root.setMsg("失败");
		}
		//printLogCat.printlnWriter(root.getXmlString());
		String rep=root.getXmlString();
%>
<%=rep%>
